home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 18305 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.5 KB

  1. Path: ix.netcom.com!news
  2. From: Bradd W. Szonye <bradds@ix.netcom.com>
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
  4. Subject: RE: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
  5. Date: 19 Apr 1996 08:52:38 GMT
  6. Organization: Netcom
  7. Message-ID: <01bb2dcd.d9f24720$c6c2b7c7@Zany.localhost>
  8. References: <JSA.96Feb16135027@organon.com> <dewar.828757752@schonberg> <danpop.828819479@rscernix> <dewar.828879781@schonberg> <4k9qhe$65r@solutions.solon.com> <dewar.828936837@schonberg> <828964950snz@genesis.demon.co.uk> <4kbfup$2vd@news1.mnsinc.com> <4kbl5i$p3@mordred.gatech.edu> <4kbr5q$j1l@mulga.cs.mu.OZ.AU>
  9. NNTP-Posting-Host: det-mi6-06.ix.netcom.com
  10. X-NETCOM-Date: Fri Apr 19  3:52:38 AM CDT 1996
  11. X-Newsreader: Microsoft Internet News
  12.  
  13.  
  14. On Monday, April 08, 1996, Fergus Henderson wrote...
  15. > james@amber.biology.gatech.edu (James McIninch) writes:
  16. > >Szu-Wen Huang (huang@mnsinc.com) wrote:
  17. > >: Shouldn't true portability mean that even bugs are cross-platform and
  18. > >: fail reliably?  ;)
  19. > >
  20. > >No.
  21. > I strongly disagree -- Szu-Wen Huang is right.
  22.  
  23. Wrong! As a developer, I *wish* that bugs were reproducible enough to
  24. actually be portable. Would make the little devils a lot easier to find.
  25.  
  26. > >When it says "undefined", it means "undefined". There's no way to make
  27. > >undefined behavior portable, that's why it's undefined.
  28. > Nope, you've got cause and effect backwards.  There's no way to make
  29. > undefined behavior portable *because* it is undefined.  If a language
  30. > has constructs with undefined behaviour, this will lead to portability
  31. > problems.  But some languages have fewer areas of undefined behaviour
  32. > than others.  Some languages don't have any undefined behaviour at
  33. > all.
  34.  
  35. Hmm. I don't know about other languages, but the whole reason things are
  36. undefined in C/C++ is because all the feuding UNIX and PC developers wrote
  37. a zillion incompatible libraries that often relied on bizarre side-effects
  38. and "fallout" behavior. ANSI/ISO made such behavior "undefined" meaning
  39. that no well-behaved, well-formed, *strictly portable* program would use
  40. such a thing. That way, compiler vendors could support the undefined
  41. behavior however they wanted or not at all, to retain maximum
  42. back-compatibility.
  43.  
  44. This is in contrast to "implementation-defined" behavior, which means that
  45. the vendor has to do *something* about the weirdness and document it.
  46. Undefined stuff can do whatever your compiler vendor wants it to. And it's
  47. undefined *because* it's not portable, not even to the extent that it may
  48. or not exist on your machine.
  49.  
  50. Bradd
  51.  
  52.  
  53.